home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
ARTOOL.ARJ
/
ART.C
next >
Wrap
Text File
|
1991-12-03
|
1KB
|
49 lines
#include <graphics.h>
/*
These routines are used to draw the polygon shapes that ARTOOL
produces.
Please compile and link into your own routines.
CopyRight (C) 1991 SunSet Software,34 Ridge Rd,Oak Ridge,NJ 07348
*/
void ArtFillPoly(int X,int Y,int NumVertices,int Vertices_xy[])
{
int points[100*2],i;
if(!NumVertices)
return;
for(i=0;i<NumVertices*2;i=i+2)
{
points[i] = Vertices_xy[i]+X;
points[i+1] = Vertices_xy[i+1]+Y;
}
points[NumVertices*2] = points[0];
points[NumVertices*2+1] = points[1];
fillpoly(NumVertices+1,points);
}
void ArtDrawPoly(int X,int Y,int NumVertices,int Vertices_xy[])
{
int points[100*2],i;
if(!NumVertices)
return;
for(i=0;i<NumVertices*2;i=i+2)
{
points[i] = Vertices_xy[i]+X;
points[i+1] = Vertices_xy[i+1]+Y;
}
points[NumVertices*2] = points[0];
points[NumVertices*2+1] = points[1];
drawpoly(NumVertices+1,points);
}